package com.javasm.domin.entity.stockEntity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 销售出库简要列表
 *
 * @TableName stock_sales_out_brief_list
 */
@TableName(value = "out_brief_list")
@Data
//@Accessors(fluent = true,chain = true)
public class OutBriefList implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 销售出库订单号
     */
    private String salesOutOrderId;

    /**
     * 订单类型
     */
    private String orderType;

    /**
     * 支付方式
     */
    private String payType;

    /**
     * 会员账号
     */
    private String vipAccount;

    /**
     * 订单状态
     */
    private String orderStatus;


    /**
     * 订单日期
     */
    private Date orderDate;

    /**
     * 客服备注信息
     */
    private String noteInfo;

    /**
     * 详细订单表id
     */
    private Integer detailOrderId;

    /**
     * 销售出库订单时间
     */
    private Date salesOutOrderDate;

    /**
     * 业务类型
     */
    private String businessType;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OutBriefList other = (OutBriefList) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getSalesOutOrderId() == null ? other.getSalesOutOrderId() == null : this.getSalesOutOrderId().equals(other.getSalesOutOrderId()))
                && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
                && (this.getPayType() == null ? other.getPayType() == null : this.getPayType().equals(other.getPayType()))
                && (this.getVipAccount() == null ? other.getVipAccount() == null : this.getVipAccount().equals(other.getVipAccount()))
                && (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus()))
                && (this.getOrderDate() == null ? other.getOrderDate() == null : this.getOrderDate().equals(other.getOrderDate()))
                && (this.getNoteInfo() == null ? other.getNoteInfo() == null : this.getNoteInfo().equals(other.getNoteInfo()))
                && (this.getDetailOrderId() == null ? other.getDetailOrderId() == null : this.getDetailOrderId().equals(other.getDetailOrderId()))
                && (this.getSalesOutOrderDate() == null ? other.getSalesOutOrderDate() == null : this.getSalesOutOrderDate().equals(other.getSalesOutOrderDate()))
                && (this.getBusinessType() == null ? other.getBusinessType() == null : this.getBusinessType().equals(other.getBusinessType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSalesOutOrderId() == null) ? 0 : getSalesOutOrderId().hashCode());
        result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
        result = prime * result + ((getPayType() == null) ? 0 : getPayType().hashCode());
        result = prime * result + ((getVipAccount() == null) ? 0 : getVipAccount().hashCode());
        result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode());
        result = prime * result + ((getOrderDate() == null) ? 0 : getOrderDate().hashCode());
        result = prime * result + ((getNoteInfo() == null) ? 0 : getNoteInfo().hashCode());
        result = prime * result + ((getDetailOrderId() == null) ? 0 : getDetailOrderId().hashCode());
        result = prime * result + ((getSalesOutOrderDate() == null) ? 0 : getSalesOutOrderDate().hashCode());
        result = prime * result + ((getBusinessType() == null) ? 0 : getBusinessType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", salesOutOrderId=").append(salesOutOrderId);
        sb.append(", orderType=").append(orderType);
        sb.append(", payType=").append(payType);
        sb.append(", vipAccount=").append(vipAccount);
        sb.append(", orderStatus=").append(orderStatus);
        sb.append(", orderDate=").append(orderDate);
        sb.append(", noteInfo=").append(noteInfo);
        sb.append(", detailOrderId=").append(detailOrderId);
        sb.append(", salesOutOrderDate=").append(salesOutOrderDate);
        sb.append(", businessType=").append(businessType);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
